<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('出题')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-exam-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">选择学习内容：</label>
                <div class="col-sm-8">
                    <select name="contentId" class="form-control m-b" th:with="contents=${@contentService.selectLearningContentList(null)}">
                        <option th:each="content : ${contents}" th:text="${content.title}" th:value="${content.contentId}"></option>
                    </select>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">答题人ID：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="creatorId" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">题目：</label>
                <div class="col-sm-8">
                    <input name="question" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/exam"
        $("#form-exam-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-exam-add').serialize());
            }
        }
    </script>
</body>
</html>